<?php
//http://localhost/expatcircles/wwwroot/home/xiehui:asdfasdfas
$id = session_id();
echo $id;
//数据库操作
$r = $db1->query('SELECT * FROM settings');
//while ($obj = $db1->fetch_object($r))
    //print_r($obj->id . "<br>");

//URL参数指定
$abc = $this->param('xiehui');
//print_r($abc . "<br>");

//包含文件加载
$filename = 'home.php';
$filename = $this->tpl_dir . 'html/' . $filename;
//print_r($filename . "<br>");
ob_start();
//require($filename);
$cnt = ob_get_contents();
ob_end_clean();
//print_r($cnt . "<br>");

//模版加载
$this->load_template('home.php');
//print_r("<br>");

//CASHE全局变量管理
$cachekey = 'n:2,username:jacky';
$abc = $this->cache->get($cachekey);
if ($abc) {
    //print_r('生成cache之前的取值:' . $abc . "<br>");
    //$data = '$abcdefg';
    //$this->cache->set($cachekey, $data, $C->CACHE_EXPIRE);
} else {
    $data = 'ddddd';
    $this->cache->set($cachekey, $data, $C->CACHE_EXPIRE);
    $abc = $this->cache->get($cachekey);
    //print_r('生成cache之后的取值:' . $abc . "<br>");
}
/*$this->cache->del($cachekey);*/

?>